#include "netcompleteevent.h"
#include <string.h>

NetCompleteEvent::NetCompleteEvent(Type type) :
    NetEvent(type),
    m_size(0)
{
    memset(m_data, 0, NET_BUFFER_DEFAULT_SIZE);
}

NetCompleteEvent::~NetCompleteEvent()
{

}

const char *NetCompleteEvent::data()
{
    return m_data;
}

size_t NetCompleteEvent::length()
{
    return NET_BUFFER_DEFAULT_SIZE;
}

size_t NetCompleteEvent::dataLength()
{
    return m_size;
}

void NetCompleteEvent::setData(const char *data, size_t size)
{
    memcpy(m_data, data, size);
    m_size = size;
}
